import { _decorator, log } from 'cc'
import { Role } from '../../Base/Role'
import { DOOR_STATE, DoorStateMachine } from './DoorStateMachine'
const { ccclass, property } = _decorator

@ccclass('DoorController')
export class DoorController extends Role {
  x = 0
  y = 0
  _fsm: DoorStateMachine = null
  init() {
    console.log('DoorController init')
    //创建门精灵组件
    this.createRoleSprite()
    this._fsm = new DoorStateMachine(this._animationComponent)
    this._fsm.stateName = DOOR_STATE.IDLE_TOP
  }
}
